package com.zenithmind.chat.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zenithmind.chat.pojo.entity.ChatFriendSetting;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 好友设置Mapper接口
 * 
 * @author ZenithMind Team
 * @since 2025-01-09
 */
@Mapper
public interface ChatFriendSettingMapper extends BaseMapper<ChatFriendSetting> {

    /**
     * 根据用户ID和好友ID获取设置
     * 
     * @param userId 用户ID
     * @param friendId 好友ID
     * @return 好友设置
     */
    ChatFriendSetting getByUserIdAndFriendId(@Param("userId") String userId, @Param("friendId") String friendId);

    /**
     * 更新或插入好友设置
     *
     * @param setting 好友设置
     * @return 是否成功
     */
    boolean insertOrUpdateSetting(ChatFriendSetting setting);
}
